Executing Specifications Using Synthesis and Constraint Solving
نویسندگان
چکیده
Specifications are key to improving software reliability as well as documenting precisely the intended behavior of software. Writing specifications is still perceived as expensive. Of course, writing implementations is at least as expensive, but is hardly questioned because there is currently no real alternative. Our goal is to give specifications a more balanced role compared to implementations, enabling the developers to compile, execute, optimize, and verify against each other mixed code fragments containing both specifications and implementations. To make specification constructs executable we combine deductive synthesis with run-time constraint solving, in both cases leveraging modern SMT solvers. Our tool decomposes specifications into simpler fragments using a cost-driven deductive synthesis framework. It compiles as many fragments as possible into conventional functional code; it executes the remaining fragments by invoking our constraint solver that extends an SMT solver to handle recursive functions. Using this approach we were able to execute constraints that describe the desired properties of integers, sets, maps and algebraic data types.
منابع مشابه
Synthesizing Piece-Wise Functions by Learning Classifiers
We present a novel general technique that classifier learning to synthesize piece-wise functions (functions that split the domain into regions, applying simpler functions to each region), working in combination with a synthesizer of the simpler functions for concrete inputs and a synthesizer of predicates that can be used to define regions. We develop a theory of single-point refutable specific...
متن کاملjmle: A Tool for Executing JML Specifications Via Constraint Programming
Formal specifications are more useful and easier to develop if they are executable. In this work, we describe a system for executing specifications written in the Java Modeling Language (JML) by translating them to constraint programs, which are then executed via the Java Constraint Kit (JCK). Our system can execute specifications written at a high level of abstraction, and the generated constr...
متن کاملAutomated Synthesis of Fixed Structure QFT Controller Using Interval Constraint Satisfaction Techniques
Robust controller synthesis is of great practical interest and its automation is a key concern in control system design. Automatic controller synthesis is still a open problem. In this paper a new, efficient method has been proposed for automated synthesis of a fixed structure quantitative feedback theory (QFT) controller by solving QFT quadratic inequalities of robust stability and performance...
متن کاملStructural Synthesis for GXW Specifications
We define the GXW fragment of linear temporal logic (LTL) as the basis for synthesizing embedded control software for safety-critical applications. Since GXW includes the use of a weak-until operator we are able to specify a number of diverse programmable logic control (PLC) problems, which we have compiled from industrial training sets. For GXW controller specifications, we develop a novel app...
متن کاملAdvancing declarative programming
This thesis attempts to unite and consolidate two large and often culturally disjoint programming paradigms: declarative (focusing on specifying what a program is supposed to do, e.g., shuffle an array so that its elements are ordered) and imperative (detailing how the program intention is to be implemented, e.g., by applying the QuickSort algorithm). The ultimate result of such an effort would...
متن کامل